import 'dart:ffi';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'lf_product_plugin_method_channel.dart';

abstract class LfProductPluginPlatform extends PlatformInterface {
  /// Constructs a LfProductPluginPlatform.
  LfProductPluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static LfProductPluginPlatform _instance = MethodChannelLfProductPlugin();

  /// The default instance of [LfProductPluginPlatform] to use.
  ///
  /// Defaults to [MethodChannelLfProductPlugin].
  static LfProductPluginPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [LfProductPluginPlatform] when
  /// they register themselves.
  static set instance(LfProductPluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  void onListening(void Function(dynamic event) onData) {
    throw UnimplementedError('onListening has not been implemented.');
  }


  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String?> getHelloWorld() {
    throw UnimplementedError('getHelloWorld() has not been implemented.');
  }

  Future<dynamic> calculate4({
    required double height,
    required double weight,
    required double heartRate,
    required double impendance,
    required int age,
    required int gender, // 1=男, 0=女
  }) {
    throw UnimplementedError('calculate4() has not been implemented.');
  }
  Future<dynamic> calculate8({
    required double height,
    required double weight,
    required double heartRate,
    required int age,
    required int gender, // 1=男, 0=女
    required int z20KhzLeftArmEnCode,
    required int z20KhzRightArmEnCode,
    required int z20KhzLeftLegEnCode,
    required int z20KhzRightLegEnCode,
    required int z20KhzTrunkEnCode,
    required int z100KhzLeftArmEnCode,
    required int z100KhzRightArmEnCode,
    required int z100KhzLeftLegEnCode,
    required int z100KhzRightLegEnCode,
    required int z100KhzTrunkEnCode,
  }) {
    throw UnimplementedError('calculate4() has not been implemented.');
  }

  Future<String?> scan() {
    throw UnimplementedError('scan() has not been implemented.');
  }
  Future<String?> link({
    required dynamic device,
  }) {
    throw UnimplementedError('link() has not been implemented.');
  }
}
